<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计算税额</title>
		<script type="text/javascript">
			var a=prompt("工资为：","");
			var b=0;
			if(isNaN(a)){
				alert("不是数字")
			}
			else if(a<=3500){
				b=0;
			}else if(3500<a<8000){
				b=(a-3500)*0.02
			}else if(8000<a<20000){
				b=(a-8000)*0.05
			}else if(a>=20000){
				b=(a-20000)*0.1
			}
			alert("税为："+b)
		</script>
	</head>
	<body>
	</body>
</html>
